Skip to content

feat: add CI verification targets and PR checks - #41

Merged
joshuapare merged 5 commits into
mainfrom
feat/ci-verification-targets
Mar 18, 2026
Merged

feat: add CI verification targets and PR checks#41
joshuapare merged 5 commits into
mainfrom
feat/ci-verification-targets

Conversation

@joshuapare

@joshuapare joshuapare commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Makefile with CI verification targets (make check runs all: go-build, go-vet, go-test, go-lint, fmt-check, bindings-check, ui-install, ui-build, ui-lint, ui-typecheck)
  • Add GitHub Actions PR workflow (.github/workflows/pr-checks.yml) that runs Go, bindings, and UI checks in parallel with caching
  • Migrate ESLint config to typescript-eslint v8 + @stylistic/eslint-plugin (fix all "rule not found" errors)
  • Add dist/.gitkeep so go:embed all:dist resolves without a frontend build
  • Fix lint target to point at ui/ instead of nonexistent src/
  • Update work-backlog skill to reference make check as standard verification

Ticket

Feature: Add CI-style verification targets and PR checks for omniview

Verification

All individual Makefile targets were tested locally:

  • make go-build — passes (with GOWORK=off + dist/.gitkeep)
  • make go-vet — passes
  • make go-test — all tests pass
  • make go-lint — runs correctly (pre-existing lint issues in codebase)
  • make fmt-check — correctly detects unformatted Go files
  • make bindings-check — correctly detects stale wails bindings
  • make ui-install — passes with --frozen-lockfile
  • make ui-build — passes (packages + frontend)
  • make ui-lint — runs correctly after eslint config migration (pre-existing lint issues)
  • make ui-typecheck — runs correctly (pre-existing type errors)

Notes

  • The eslint config was migrated from @typescript-eslint v7 rules to v8 equivalents, moving 17 formatting rules to @stylistic/eslint-plugin
  • Pre-existing lint/type errors exist on main — this PR adds the infrastructure to catch them, not fix them
  • The bindings-check target detected that the committed wails bindings on main are stale (missing direction and targetNamespaced fields in RelationshipDescriptor)

Summary by CodeRabbit

  • Chores

    • Updated linting and stylistic tooling and adjusted lint script.
    • Added a new PR checks workflow to validate builds, bindings and UI.
    • Expanded Makefile verification targets to consolidate CI tasks.
    • Unignored a placeholder file in distribution output.
  • Tests

    • Improved test scaffolding to ensure required directories exist before running.
  • Chores

    • Updated runtime data model shapes used by the UI/runtime.

- Rename .eslintrc.js to .eslintrc.cjs (ESM module compatibility)
- Replace 17 removed formatting rules with @stylistic/eslint-plugin equivalents
- Replace ban-types with no-restricted-types + no-unsafe-function-type + no-wrapper-object-types
- Replace no-empty-interface with no-empty-object-type
- Replace no-throw-literal with only-throw-error
- Remove no-var-requires (covered by no-require-imports)
- Remove prefer-ts-expect-error (covered by ban-ts-comment)
- Replace no-loss-of-precision with base ESLint rule
- Fix lint target to point at ui/ instead of nonexistent src/
- Point parserOptions.project at tsconfig.app.json
Add Makefile targets for deterministic local/CI verification:
- make check: runs all checks in sequence (fail-fast)
- Go: go-build, go-vet, go-test, go-lint, fmt-check, fmt
- Bindings: bindings, bindings-check (detects stale wails bindings)
- UI: ui-install, ui-build, ui-lint, ui-typecheck

Add GitHub Actions PR workflow (.github/workflows/pr-checks.yml):
- Runs Go checks, bindings freshness, and UI checks in parallel
- Caches Go modules and pnpm store
- Gates PR merges on all checks passing

Add dist/.gitkeep so go:embed all:dist resolves without a
frontend build, enabling Go checks to run independently.
@coderabbitai

coderabbitai Bot commented Mar 18, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@joshuapare has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 2 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: faa24743-ccbc-42c8-a000-825da99ca1dd

📥 Commits

Reviewing files that changed from the base of the PR and between ca1e012 and 7ea9836.

📒 Files selected for processing (2)
  • .github/workflows/pr-checks.yml
  • Makefile
📝 Walkthrough

Walkthrough

Reorganizes CI and linting, adds a PR GitHub Actions workflow, extends Makefile CI targets, updates ESLint configuration and package scripts, ensures plugin PID test directories exist, tweaks runtime relationship model fields, and adjusts .gitignore to keep dist/.gitkeep.

Changes

Cohort / File(s) Summary
ESLint & package scripts
./.eslintrc.cjs, package.json
Switches TypeScript project to tsconfig.app.json; replaces many @typescript-eslint rules with @stylistic or other equivalents; enables ts-ignore in ts-expect-error; adds @stylistic/eslint-plugin; updates scripts.lint to target the ui directory.
CI workflow & Makefile
.github/workflows/pr-checks.yml, Makefile
Adds new "PR Checks" GitHub Actions workflow (jobs: go-checks, bindings-check, ui-checks) and a concurrency group; expands Makefile with consolidated CI/verification targets (check, go-, bindings-, ui-*, fmt, fmt-check) and removes legacy lint/kubernetes lint targets.
Version control & ignores
.gitignore
Adds an exception to keep dist/.gitkeep while dist remains ignored.
Tests (backend)
backend/pkg/plugin/pids_test.go
Introduces ensurePluginPIDDir helper and calls to create plugin PID directory before Save/Load and cleanup tests to avoid missing-directory failures.
Runtime model types
packages/omniviewdev-runtime/src/wailsjs/go/models.ts
Removes ownerRefKind from RelationshipExtractor; adds optional direction and targetNamespaced fields to RelationshipDescriptor and updates constructors to read them.
Misc (new files)
...
Minor additions/adjustments implied by workflow and Makefile changes (no exported API changes).

Sequence Diagram(s)

sequenceDiagram
    participant PR as Pull Request
    participant GH as GitHub Actions
    participant Runner as Runner (ubuntu-latest)
    participant Make as Makefile
    participant Go as Go toolchain
    participant Wails as Wails tooling
    participant Node as Node/PNPM

    PR->>GH: push PR triggers "PR Checks"
    GH->>Runner: start job (go-checks)
    Runner->>Make: run make go-build / go-vet / go-test / fmt-check
    Make->>Go: invoke go build/vet/test/format
    GH->>Runner: start job (bindings-check)
    Runner->>Make: run make bindings-check
    Make->>Wails: run bindings verification
    GH->>Runner: start job (ui-checks)
    Runner->>Make: run make ui-install / ui-build / ui-lint / ui-typecheck
    Make->>Node: install/build/lint/typecheck via PNPM/Node
    Runner-->>GH: report job statuses
    GH-->>PR: post checks results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 With twitching nose I hop and cheer,

Linters tuned and workflows clear,
Bindings checked, the builds all play,
Tests prepare the PID way,
A tidy tree for springtime code hooray!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main changes: adding CI verification targets and PR checks workflow, which aligns with the primary objectives of adding Makefile targets and GitHub Actions workflow.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ci-verification-targets
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Fix pids_test.go: ensure ~/.omniview/ directory exists before tests
  that write to the PID file (fails on CI runners without home setup)
- Regenerate stale wails bindings (models.ts was out of sync with Go
  structs: added direction, targetNamespaced fields; removed ownerRefKind)
- Remove --max-warnings 0 from lint script (1523 pre-existing errors)
- Mark fmt-check, go-lint, ui-lint, ui-typecheck as continue-on-error
  in CI workflow (pre-existing issues on main, will be fixed separately)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/pr-checks.yml:
- Around line 7-9: The concurrency group key "pr-checks-${{ github.head_ref }}"
is not PR-unique; update the key to include a PR-unique identifier (for example
use github.event.pull_request.number or include the head repository) so runs
from different forks/PRs with the same branch name do not collide; locate the
concurrency block (the "concurrency" group setting) and change the group string
to include either "${{ github.event.pull_request.number }}" or "${{
github.head_repo }}" (or both) to make the key unique per PR.
- Around line 41-45: Replace the non-deterministic version pin in the GitHub
Actions "Lint" step that uses golangci/golangci-lint-action (currently set as
version: latest) with a specific release tag (for example v2.10 or another
tested release) to ensure reproducible CI; update the version field in the Lint
step of the workflow so the action reference remains the same
(golangci/golangci-lint-action@v6) but the with.version value is a fixed tag
instead of "latest".

In `@backend/pkg/plugin/pids_test.go`:
- Around line 47-49: Extract the repeated PID-directory setup into a test
helper: create a new function ensurePluginPIDDir(t *testing.T) that calls
require.NoError(t, os.MkdirAll(filepath.Dir(pluginPIDFilePath()), 0755)) and use
it in tests that currently duplicate that line (replace occurrences around
pluginPIDFilePath in pids_test.go, e.g., the blocks at lines referenced in the
review). Update all tests to call ensurePluginPIDDir(t) before operating on PID
files so setup is consistent and reduces duplication.

In `@Makefile`:
- Around line 32-42: The fmt-check target is inconsistent with fmt: fmt runs
both goimports and gofmt but fmt-check only checks gofmt; update fmt-check to
mirror fmt by verifying both goimports and gofmt (or remove goimports from fmt).
Specifically, modify the Makefile's fmt-check target (referencing targets "fmt"
and "fmt-check" and the tools "goimports" and "gofmt") so it detects files that
would be modified by goimports as well as gofmt, and fail when either tool would
change files.
- Around line 48-57: The bindings-check recipe can mask failures and leave the
repo dirty; modify the bindings-check target so it starts with "set -e" to exit
on first error, create a trap handler that always removes TMPDIR and, on
failure, restores the backup copy at "$$TMPDIR/wailsjs-before" back to
packages/omniviewdev-runtime/src/wailsjs (or otherwise revert changes) before
exiting; ensure the trap runs for both success and error paths and that TMPDIR
is cleaned up so a failing "cp" or "wails generate module" cannot be hidden nor
leave modified bindings in place.

In `@package.json`:
- Line 11: The npm "lint" script currently ("lint": "eslint ui --ext ts,tsx
--report-unused-disable-directives") is missing the environment variable used by
the Makefile target; update the package.json "lint" script to set
ESLINT_USE_FLAT_CONFIG=false (or use a cross-platform wrapper) so pnpm lint
matches make ui-lint, or alternatively complete the ESLint flat-config migration
(remove .eslintrc.cjs and add eslint.config.*) so the env var is no longer
required; target the "lint" script entry in package.json and the presence of
.eslintrc.cjs when implementing the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c1b34d5f-3e4c-4498-9e36-3f64d8ec74f7

📥 Commits

Reviewing files that changed from the base of the PR and between ef8b8a2 and cec6081.

⛔ Files ignored due to path filters (2)
  • dist/.gitkeep is excluded by !**/dist/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • .eslintrc.cjs
  • .github/workflows/pr-checks.yml
  • .gitignore
  • Makefile
  • backend/pkg/plugin/pids_test.go
  • package.json
  • packages/omniviewdev-runtime/src/wailsjs/go/models.ts
  • packages/omniviewdev-runtime/src/wailsjs/runtime/package.json
  • packages/omniviewdev-runtime/src/wailsjs/runtime/runtime.d.ts
  • packages/omniviewdev-runtime/src/wailsjs/runtime/runtime.js

Comment thread .github/workflows/pr-checks.yml
Comment thread .github/workflows/pr-checks.yml
Comment thread backend/pkg/plugin/pids_test.go Outdated
Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment on lines +48 to +57
bindings-check:
@TMPDIR=$$(mktemp -d); \
cp -R packages/omniviewdev-runtime/src/wailsjs "$$TMPDIR/wailsjs-before"; \
GOWORK=off wails generate module; \
if ! diff -r packages/omniviewdev-runtime/src/wailsjs "$$TMPDIR/wailsjs-before" >/dev/null 2>&1; then \
echo "Wails bindings are stale. Run 'make bindings' and commit the result."; \
rm -rf "$$TMPDIR"; \
exit 1; \
fi; \
rm -rf "$$TMPDIR"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -e
printf 'bindings-check recipe:\n'
sed -n '48,57p' Makefile
printf '\nShell exit-code demo:\n'
code=$(sh -c 'false; true'; printf '%s' "$?")
printf 'exit=%s\n' "$code"

Repository: omniviewdev/omniview

Length of output: 519


🏁 Script executed:

# Check if there are other make recipes that might show similar patterns
grep -n "set -e\|&&\|trap" Makefile | head -20

Repository: omniviewdev/omniview

Length of output: 117


🏁 Script executed:

# Check if wails generate is used elsewhere
rg "wails generate" -n

Repository: omniviewdev/omniview

Length of output: 665


🏁 Script executed:

# Look at the entire Makefile context around the recipe
cat -n Makefile | sed -n '40,65p'

Repository: omniviewdev/omniview

Length of output: 857


🏁 Script executed:

# Check if there's a bindings make recipe (likely related to this check)
grep -n "^bindings:" Makefile

Repository: omniviewdev/omniview

Length of output: 76


🏁 Script executed:

bindings-check:
	`@set` -e; \
	TMPDIR=$$(mktemp -d); \
	trap "rm -rf \"$$TMPDIR\"" EXIT; \
	cp -R packages/omniviewdev-runtime/src/wailsjs "$$TMPDIR/wailsjs-before"; \
	GOWORK=off wails generate module; \
	if ! diff -r packages/omniviewdev-runtime/src/wailsjs "$$TMPDIR/wailsjs-before" >/dev/null 2>&1; then \
		echo "Wails bindings are stale. Run 'make bindings' and commit the result."; \
		exit 1; \
	fi

Repository: omniviewdev/omniview

Length of output: 229


🏁 Script executed:

trap "cp -R \"$$TMPDIR/wailsjs-before\" packages/omniviewdev-runtime/src/wailsjs; rm -rf \"$$TMPDIR\"" EXIT

Repository: omniviewdev/omniview

Length of output: 131


Use set -e and trap to prevent error masking and restore state on failure.

This recipe chains commands with semicolons without set -e, which masks failures: if cp or wails generate module fails, the error is hidden by subsequent commands returning 0. Additionally, the recipe modifies the working tree by running wails generate module in place (line 51), leaving bindings modified even when the check fails.

To fix this:

  • Add set -e to fail immediately on any error
  • Use a trap cleanup handler to ensure rm -rf "$$TMPDIR" and optionally restore the backup on error
  • Consider whether bindings should be regenerated in place during a check, or whether the backup should be restored before exiting on failure

This prevents silent failures and ensures the working tree is not dirtied when bindings are stale.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 48 - 57, The bindings-check recipe can mask failures
and leave the repo dirty; modify the bindings-check target so it starts with
"set -e" to exit on first error, create a trap handler that always removes
TMPDIR and, on failure, restores the backup copy at "$$TMPDIR/wailsjs-before"
back to packages/omniviewdev-runtime/src/wailsjs (or otherwise revert changes)
before exiting; ensure the trap runs for both success and error paths and that
TMPDIR is cleaned up so a failing "cp" or "wails generate module" cannot be
hidden nor leave modified bindings in place.

Comment thread package.json Outdated
- Use PR number in concurrency group key to avoid cross-fork collisions
- Pin golangci-lint version to v2.1 instead of latest
- Extract ensurePluginPIDDir helper to deduplicate test setup
- Make fmt-check verify both goimports and gofmt (matching fmt target)
- Add set -e and trap cleanup to bindings-check so failures restore
  the original bindings and always clean up the temp directory
- Move ESLINT_USE_FLAT_CONFIG=false into package.json lint script so
  pnpm lint and make ui-lint behave identically

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/pr-checks.yml:
- Line 14: Update the workflow environment version pins to exactly match
.tool-versions: change PNPM_VERSION to 9.15.0, NODE_VERSION to 20.18.1, and
GO_VERSION to 1.23.8 (update the PNPM_VERSION, NODE_VERSION and GO_VERSION
variables used in the workflow file so CI and local dev use the same tool
versions).

In `@Makefile`:
- Around line 36-45: The fmt-check target currently skips import validation when
goimports is missing; update the fmt-check rule (and align with the existing fmt
target behavior) to require goimports by failing loudly if command -v goimports
returns non-zero—i.e., detect absence of goimports and echo an error + exit
non-zero (or invoke go install golang.org/x/tools/cmd/goimports) before running
goimports -l ., so CI cannot silently pass when goimports is not installed;
refer to the fmt-check target and the fmt target when making this change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2ad855b9-e965-41bc-a55b-3409740ac1ce

📥 Commits

Reviewing files that changed from the base of the PR and between cec6081 and ca1e012.

📒 Files selected for processing (4)
  • .github/workflows/pr-checks.yml
  • Makefile
  • backend/pkg/plugin/pids_test.go
  • package.json

Comment thread .github/workflows/pr-checks.yml Outdated
env:
GO_VERSION: "1.26"
NODE_VERSION: "20"
PNPM_VERSION: "10"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo ".tool-versions:"
sed -n '1,5p' .tool-versions

echo
echo "Workflow env versions:"
sed -n '11,15p' .github/workflows/pr-checks.yml

Repository: omniviewdev/omniview

Length of output: 213


Align all environment versions with .tool-versions.

Version mismatches between workflow and .tool-versions can cause local/CI drift:

  • PNPM: workflow pins 10, .tool-versions has 9.15.0
  • NODE: workflow pins 20, .tool-versions has 20.18.1
  • GO: workflow pins 1.26, .tool-versions has 1.23.8 (most significant drift)

Update all three to match .tool-versions for consistency.

💡 Example fix
 env:
-  GO_VERSION: "1.26"
-  NODE_VERSION: "20"
-  PNPM_VERSION: "10"
+  GO_VERSION: "1.23.8"
+  NODE_VERSION: "20.18.1"
+  PNPM_VERSION: "9.15.0"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr-checks.yml at line 14, Update the workflow environment
version pins to exactly match .tool-versions: change PNPM_VERSION to 9.15.0,
NODE_VERSION to 20.18.1, and GO_VERSION to 1.23.8 (update the PNPM_VERSION,
NODE_VERSION and GO_VERSION variables used in the workflow file so CI and local
dev use the same tool versions).

Comment thread Makefile
- Pin NODE_VERSION to 20.18.1 and PNPM_VERSION to 9.15.0 to match
  .tool-versions (GO_VERSION stays at 1.26 per go.mod requirement)
- Make fmt-check fail loudly when goimports is not installed instead
  of silently skipping the import check
@joshuapare
joshuapare merged commit 4762497 into main Mar 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant